package la.iok.hzsvn.lewin.movie.core.model;

import java.util.Date;

public class PlayRecordVo {
    /**
     * 播放进行中
     */
    public static final int STATUS_IN_PROGRESS = 1;
    /**
     * 播放结束
     */
    public static final int STATUS_ENDED = 2;
    /**
     * 定时结束的时候,正在任务结束处理中
     */
    public static final int STATUS_ENDING = -1;
    /**
     * 设备结束
     */
    public static final int END_TYPE_DEVICE = 1;
    /**
     * 用户自己结束，不经过设备
     */
    public static final int END_TYPE_USER = 2;
    /**
     * 系统自动结束
     */
    public static final int END_TYPE_SYSTEM = 3;

    private Long id;
    /**
     * 剧本id,不是实例id
     */
    private Long movieId;
    /**
     * 剧本版本
     */
    private String movieVersion;
    /**
     * 剧本名称。冗余字段
     */
    private String movieName;
    /**
     * 开本的DM的id
     */
    private Long dmId;
    /**
     * DM账号，目前为手机号,冗余字段。
     */
    private String dmAccount;
    /**
     * DM昵称。可能为空
     */
    private String dmNickname;
    /**
     * 开本房间id
     */
    private Long roomId;
    /**
     * 房间名称。冗余字段。只记录开本时的值,开本后修改房间名称此处不更新
     */
    private String roomName;
    /**
     * 店铺id
     */
    private Long orgUnitId;
    /**
     * 店铺名称。冗余字段。只记录开本时的值,开本后修改店铺名称此处不更新
     */
    private String orgUnitName;
    /**
     * 开本设备名称
     */
    private String deviceName;
    /**
     * 状态
     */
    private Integer status;
    /**
     * 开本时间
     */
    private Date startTime;
    /**
     * 结束时间
     */
    private Date endTime;
    /**
     * 结束剧本的人，如果有昵称返回昵称，没有就返回手机号。如果是DM或者店长或者店铺管理员（包括DM自己结束及通过PC发送命令结束），都是操作用户。如果是系统自己结束的，那就是系统
     */
    private String terminator;
    /**
     * 开本的金额,单位为分
     */
    private Integer cost;
    /**
     * 总金额减去优惠之后的实际支付金额
     */
    private Integer payAmount;
    /**
     * 总优惠金额，目前就是使用返利扣减的金额
     */
    private Integer luckyAmount;
    /**
     * 是否测试开本。测试开本不收费但是会显示水印
     */
    private Integer test;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getMovieId() {
        return movieId;
    }

    public void setMovieId(Long movieId) {
        this.movieId = movieId;
    }

    public String getMovieVersion() {
        return movieVersion;
    }

    public void setMovieVersion(String movieVersion) {
        this.movieVersion = movieVersion;
    }

    public String getMovieName() {
        return movieName;
    }

    public void setMovieName(String movieName) {
        this.movieName = movieName;
    }

    public Long getDmId() {
        return dmId;
    }

    public void setDmId(Long dmId) {
        this.dmId = dmId;
    }

    public String getDmAccount() {
        return dmAccount;
    }

    public void setDmAccount(String dmAccount) {
        this.dmAccount = dmAccount;
    }

    public String getDmNickname() {
        return dmNickname;
    }

    public void setDmNickname(String dmNickname) {
        this.dmNickname = dmNickname;
    }

    public Long getRoomId() {
        return roomId;
    }

    public void setRoomId(Long roomId) {
        this.roomId = roomId;
    }

    public String getRoomName() {
        return roomName;
    }

    public void setRoomName(String roomName) {
        this.roomName = roomName;
    }

    public Long getOrgUnitId() {
        return orgUnitId;
    }

    public void setOrgUnitId(Long orgUnitId) {
        this.orgUnitId = orgUnitId;
    }

    public String getOrgUnitName() {
        return orgUnitName;
    }

    public void setOrgUnitName(String orgUnitName) {
        this.orgUnitName = orgUnitName;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Integer getCost() {
        return cost;
    }

    public void setCost(Integer cost) {
        this.cost = cost;
    }

    public Integer getPayAmount() {
        return payAmount;
    }

    public void setPayAmount(Integer payAmount) {
        this.payAmount = payAmount;
    }

    public Integer getLuckyAmount() {
        return luckyAmount;
    }

    public void setLuckyAmount(Integer luckyAmount) {
        this.luckyAmount = luckyAmount;
    }

    public Integer getTest() {
        return test;
    }

    public void setTest(Integer test) {
        this.test = test;
    }
    /**
     * 是否正在播放中
     * @return 是播放中返回true,否则false
     */
    public boolean playing(){
        return status == STATUS_IN_PROGRESS;
    }

    /**
     * 正在结束播放
     * @return 正在结束播放返回true,否则false
     */
    public boolean ending(){
        return status == STATUS_ENDING;
    }

    /**
     * 是否已经结束
     * @return 已经结束返回true,否则false
     */
    public boolean ended(){
        return status == STATUS_ENDED;
    }

    public String getTerminator() {
        return terminator;
    }

    public void setTerminator(String terminator) {
        this.terminator = terminator;
    }
}
